home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2000 #5
/
Amiga Plus CD - 2000 - No. 5.iso
/
Tools
/
Dev
/
GameboyDev
/
GBDK
/
lib
/
strcmp.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1999-03-29
|
224 b
|
18 lines
#include <string.h>
/*
/*
* Compare strings:
* s1>s2: >0
* s1==s2: 0
* s1<s2: <0
*/
BYTE strcmp(const char *s1, const char *s2)
{
while(*s1 == *s2++)
if(*s1++=='\0')
return 0;
return (*s1 - *--s2);
}